package org.projects.graduates.app;

import java.util.List;

import org.projects.graduates.domain.ContentStatus;
import org.projects.graduates.domain.Course;
import org.projects.graduates.domain.HomeworkAssignments;
import org.projects.graduates.domain.HomeworkComment;
import org.projects.graduates.domain.HomeworkHandin;
import org.projects.graduates.domain.Person;
import org.projects.graduates.page.Pager;

import com.dayatang.domain.AbstractEntity;
import com.dayatang.domain.EntityRepository;

public interface GradApplication {
	void save(AbstractEntity entity);

	void remove(AbstractEntity entity);

	void setUp(Person teacher, Course course);

	/**
	 * 根据分页拿到上交的作业
	 * 
	 * @return
	 */
	List<HomeworkHandin> handinsOfHomework(Pager pager, HomeworkAssignments ha, ContentStatus status,
			EntityRepository repository);

	/**
	 * 为上交的作业打分
	 * 
	 * @param handin
	 * @param score
	 * @param who
	 */
	void scoreHomeworkHandin(HomeworkHandin handin, int score, Person who);

	/**
	 * 作业的评论
	 * 
	 * @param pager
	 * @param handin
	 * @param repository
	 * @return
	 */
	List<HomeworkComment> commentsOfHomeworkhandins(Pager pager, HomeworkHandin handin, EntityRepository repository);

	/**
	 * 显示是否已经存在
	 * 
	 * @param showName
	 * @return
	 */
	boolean existShowname(String showName);
	
	/**
	 * 当用用户选课
	 * @param course
	 */
	void selecCourse(Person person, Course course);
	
	
}
